<template>
  <li
    :key="item.brandId"
    ref="node"
    :style="{ height: `${item.height}px`, 'line-height': `${item.height}px` }"
  >
    <div>
      <div>{{ item.name }}</div>
    </div>
  </li>
</template>

<script>
export default {
  props: {
    item: {
      default() {
        return {};
      },
      type: Object,
    },

    index: Number,
  },
  data() {
    return {};
  },
  mounted() {
    const el = this.$refs.node;
    this.$emit("update-height", {
      index: this.index,
      height: el.clientHeight,
    });
  },
};
</script>
